﻿<Window x:Class="ChecksumGUI.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="ChecksumGUI" ResizeMode="CanMinimize" SizeToContent="WidthAndHeight" AllowDrop="True" Icon="/ChecksumGUI;component/ChecksumGUI.ico">
    <Window.Resources>
        <SolidColorBrush x:Key="ValidBrush">#CDC8FF20</SolidColorBrush>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="300"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <!-- HashAlgorithm -->
        <TextBlock Text="Hash Algorithm :" VerticalAlignment="Center" Margin="2" />
        <ComboBox Name="cbxAlgorithm" Grid.Column="1" HorizontalAlignment="Left" Width="100" Margin="2">
            <ComboBoxItem Content="MD5" />
            <ComboBoxItem Content="SHA1" />
            <ComboBoxItem Content="SHA256" />
            <ComboBoxItem Content="SHA384" />
            <ComboBoxItem Content="SHA512" />
        </ComboBox>
        <!-- Input string -->
        <TextBlock Text="Text :" Grid.Row="1"  VerticalAlignment="Center" Margin="2" />
        <TextBox Name="tbxInputString" Grid.Row="1" Grid.Column="1" Margin="2"></TextBox>
        <Button Name="btnComputeStringHash" Content="Compute Hash" Grid.Row="1" Grid.Column="2" Margin="2" />
        <!-- Input file -->
        <TextBlock Text="File :" Grid.Row="2"  VerticalAlignment="Center" Margin="2" />
        <Grid Grid.Row="2" Grid.Column="1" Margin="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <TextBox Name="tbxInputFile" IsReadOnly="True" Margin="0,0,2,0" />
            <Button Name="btnBrowseFile" Content="Browse" Grid.Column="1" Margin="2,0,0,0" />
        </Grid>
        <Button Name="btnComputeFileHash" Content="Compute Hash" Grid.Row="2" Grid.Column="2" Margin="2" />
        <!-- Computed Hash -->
        <TextBlock Text="Hash :" Grid.Row="3"  VerticalAlignment="Center" Margin="2" />
        <TextBox Name="tbxComputedHash" IsReadOnly="True" Grid.Row="3" Grid.Column="1" Margin="2" />
        <Button Name="btnCopyHash" Content="Copy Hash" Grid.Row="3" Grid.Column="2" Margin="2" IsEnabled="False" />
        <!-- Compare Hash -->
        <TextBlock Text="Compare :" Grid.Row="4"  VerticalAlignment="Center" Margin="2" />
        <TextBox Name="tbxCompareHash" Grid.Row="4" Grid.Column="1" Margin="2" />
        <Image Name="imgCompareOK" Grid.Row="4" Grid.Column="2" Source="/ChecksumGUI;component/Resources/OK_16x16.png" HorizontalAlignment="Left" Margin="2" Visibility="Hidden" ToolTip="Same Hash" />
        <Image Name="imgCompareError" Grid.Row="4" Grid.Column="2" Source="/ChecksumGUI;component/Resources/Error_16x16.png" HorizontalAlignment="Left" Margin="2" Visibility="Hidden" ToolTip="Different Hash" />
    </Grid>
</Window>
